<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
  <head>
    <title>event-correlation-view</title>
   <%@ include file="../include/common.jsp"%>
    <%@ include file="../include/tree.jsp"%>
    <%@ include file="../include/form.jsp"%>
    <%@ include file="../include/jbox.jsp"%>
    <%@ include file="../include/table.jsp"%>
	<style type="text/css">
		.ztree {border: 1px solid #617775;background: #f0f6e4;width:220px;height:360px;overflow-y:scroll;overflow-x:auto;}

		table.display td{
			white-space:normal;
		}
	</style>
	<script type="text/javascript">
		$(function(){
		});
		function back(){
			window.history.back();
		}
	</script>
  </head>
  
  <body>
  		<h2 class="title-h2"><span><img src="${pageContext.request.contextPath}/style/default/bsm/images/arrow-down.gif"/></span>预览事件相关性</h2>
    	<form action="">
    		<table id="mytable" border="0" class="table_eidt">
    			<tr>
    				<th width="150px" class="td_left">
    					<label>规则名称</label>
    				</th>
    				<td class="td_right">
    					${eventCorrelationPolicyBean.eventCorrelationPolicy.name}
    				</td>
    			</tr>
    			<tr>
    				<th class="td_left">
    					<label>压制时间(秒)</label>
    				</th>
    				<td class="td_right">
    					${eventCorrelationPolicyBean.eventCorrelationPolicy.delay}
    				</td>
    			</tr>
    			<tr>
    				<th class="td_left">
    					<label>指定资源</label>
    				</th>
    				<td class="td_right">
    					${eventCorrelationPolicyBean.mainResName}
    				</td>
    			</tr>
    			<tr>
    				<th class="td_left">
    					<label>主事件类别</label>
    				</th>
    				<td class="td_right">
	    				${eventCorrelationPolicyBean.mainEventTypeName}
    				</td>
    			</tr>
    			<tr>
    				<th class="td_left">
    					<label>从事件关联</label>
    				</th>
    				<td class="td_right">
						<div style="width: 700px;">
							<table cellpadding="0" cellspacing="0" class="display dataTable">
									<thead>
										<tr>
											<th width="100">序号</th>
											<th width="200">指定资源</th>
											<th>从事件类别</th>
											<th width="100">关系类型</th>
										</tr>
									</thead>
									<tbody>	
										<c:forEach items="${eventCorrelationLinkList}" var="e" varStatus="status">
											<c:if test="${(status.index+1) mod 2 !=0}">
												<tr class="even">
													<td>
														${e.eventCorrelationLink.serialNumber}
													</td>
													<td>
														${e.resName}				
													</td>
													<td>
														${e.eventTypeLinkName}
													</td>
													<td>
														${e.resRelationName}
													</td>
												</tr>
											</c:if>
											<c:if test="${(status.index+1) mod 2 ==0}">
												<tr class="odd">
													<td>
														${e.eventCorrelationLink.serialNumber}
													</td>
													<td>
														${e.resName}				
													</td>
													<td>
														${e.eventTypeLinkName}
													</td>
													<td>
														${e.resRelationName}
													</td>
												</tr>
											</c:if>
										</c:forEach>
									</tbody>
							</table>
						</div>
						<div>
							${eventCorrelationPolicyBean.eventCorrelationPolicy.extendConfig}
						</div>
    				</td>
    			</tr>
    			<tr>
    				<th class="td_left">
    					<label>规则说明</label>
    				</th>
    				<td class="td_right">
    					${eventCorrelationPolicyBean.eventCorrelationPolicy.memo}
    				</td>	
    			</tr>
    		</table>
    		<div style="margin-left:150px; margin-top:5px;">
		    	<input type="button" value="返回" onclick="back();" class="btn-4">
    		</div>
    	</form>
  </body>
</html>
